﻿@using MyFinance.Helpers;
@using MyFinance.Domain;
@model IEnumerable<Category>   
  <table>
        <tr> 
        <th>Actions</th>
        <th>Name</th>
         <th>Description</th>
        </tr>
    @foreach (var item in Model) {    
        <tr>
            <td>
                @Html.ActionLink("Edit", "Edit",new { id = item.CategoryId })
                @Ajax.ActionLink("Delete", "Delete", new { id = item.CategoryId },
                new AjaxOptions { Confirm = "Delete Expense?", HttpMethod = "Post", 
                    UpdateTargetId = "divCategoryList" })              
            </td>
            <td>
                @item.Name
            </td>
            <td>
                @item.Description
            </td>
        </tr>
    
    }

    </table>
	<p>
        @Html.ActionLink("Create New", "Create")
    </p>
